<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib prefix="t" tagdir="/WEB-INF/tags/general" %>

<c:set var="basePath" value="${pageContext.servletContext.contextPath}"/>
<t:template>
     <div>
	<c:if test="${fn:length(transactions) > 0}">
	<table style="color:black; background-color:white;">
		<tr class="m">
			<td rowspan="2"><b>Pay account:</b></td>
			<td rowspan="2"><b>Reciever account:</b></td>
			<td rowspan="2"><b>Amount:</b></td>
			<td rowspan="2"><b>Transaction date:</b></td>
			<td rowspan="2" style="float:clear;"><b>Details:</b></td>
		</tr>
		<tr class ="m"></tr>
		<c:forEach items="${transactions}" var="transaction">
		<tr class="m row">
			<td>${transaction[4]}</td>
			<td>${transaction[5]}</td>
			<td>${transaction[6]}</td>
			<td>${transaction[7]}</td>
			<td>${transaction[8]}</td>
		</tr>
		</c:forEach>
	</table>
	<a href="${basePath}/bank/ibank/transactionXmlExport">Export to XML</a> ||
	<a href="${basePath}/bank/ibank/transactionExcelExport">Export to Excel</a>
	</c:if>
	
	
	
	<div id="exc">	
	<c:if test="${fn:length(transactions) < 1}">
		
		<table style="color:black; background-color:white;">
			<tr>
				<td colspan="7"><a style="color: red">There are no transactions.</a></td>
			</tr>
		</table>
		
	</c:if>
	
	</div>	
</div>
</t:template>